import 'package:flutter/material.dart';

void main() {
  runApp(MaterialApp(
    home: Scaffold(
      appBar: AppBar(
        title: const Text("Indicator Demo"),
      ),
      body: SizeBoxWidget(),
    ),
  ));
}

class SizeBoxWidget extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return SizedBox(
      width: 80.0,
      height: 80.0,
      //等价于  BoxConstraints(minHeight: 80.0,maxHeight: 80.0,minWidth: 80.0,maxWidth: 80.0)
      child: Container(
        // Container的高度设置为5像素，但是最终却是50像素，这正是ConstrainedBox的最小高度限制生效了
        height: 5.0,
        child: null,
        color: Colors.red,
      ),
    );
  }
}
